package com.example.demo.service;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.demo.custom.BaseService;
import com.example.demo.entity.SysUser;
import com.example.demo.entity.TargetAndBackMonkeyPeople2;
import com.example.demo.repository.TargetAndBackMonkeyPeopleRepository2;

@Service
public class TargetAndBackMonkeyPeopleService2 extends BaseService<TargetAndBackMonkeyPeople2, Integer>{
	@Autowired
	private TargetAndBackMonkeyPeopleRepository2 tDao;
	
	public List<TargetAndBackMonkeyPeople2> findByUser(SysUser user) {
		
		return tDao.findByUser(user);
	}

	public TargetAndBackMonkeyPeople2 findByDateAndUser(Date date, SysUser myUser) {
		return tDao.findByDateAndUser(date,myUser);
	}

	public TargetAndBackMonkeyPeople2 findByUserId(Integer userId) {
		return tDao.findByUserId(userId);
	}

	public TargetAndBackMonkeyPeople2 findByUserIdAndDate(Integer userId, Date date) {
		// TODO Auto-generated method stub
		return tDao.findByUserIdAndDate(userId,date);
	}

}
